package product;

import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.util.Calendar;
import java.util.Date;
import java.util.Vector;

import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JInternalFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.SwingConstants;
import javax.swing.border.BevelBorder;
import javax.swing.border.EmptyBorder;
import javax.swing.event.InternalFrameAdapter;
import javax.swing.event.InternalFrameEvent;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableColumnModel;
import javax.swing.table.TableModel;
import javax.swing.table.TableRowSorter;

public class MemberHoly extends JInternalFrame {

	Connection conn;
	PreparedStatement pstmt;
	ResultSetMetaData rsmd;
	ResultSet rs;
	Vector<String> v;
	MemberHolyselect mhs;
	TableRowSorter<TableModel> tSoter;
	Calendar c;
	DefaultTableCellRenderer Center = new DefaultTableCellRenderer();
	TableColumnModel tcmSchedule;
	
	int year,month,nal;


	DefaultTableModel model; // 휴가View
	DefaultComboBoxModel cmodel = new DefaultComboBoxModel<>(); // 년월일 콤보박스
	DefaultComboBoxModel ccmodel = new DefaultComboBoxModel<>();
	ProductMain3 pm; // main

	Date date = new Date();
	int day;
	Vector<String> vec;
	JTable tb;
	JComboBox jb;

	String yy,mm,dd;  // 년월일 입력값
	String YY,MM,DD; // 년월일 조회값

	
	HolyReason hr = null; // 사유서View창 관리자용
	HolyReason2 hr2 = null; // 사유서 수정창 사원용
	String Reason = ""; //사유서view와 수정창에 보여지는 값을 저장할 변수


	//	년월일 default 선택값
	String[] y = {"","2014", "2015", "2016", "2017"};
	String[] m = {"","01","02","03","04","05","06","07","08","09","10","11","12"};
	String[] d = {"", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"};

	private JPanel contentPane;
	private JPanel LOGINnInput;
	private JPanel HOLY;
	private JPanel ECT;
	private JPanel holyMain;
	private JPanel holyInput;
	private JButton btnNewButton_1;
	private JPanel holypay;
	private JPanel holynotpay;
	private JLabel lblNewLabel_2;
	private JButton btnNewButton_2;
	private JButton button;
	private JButton button_1;
	private JPanel editorbtn;
	private JButton button_2;
	private JButton button_4;
	private JPanel ViewControl;
	private JPanel VIEW;
	private JButton button_5;
	private JButton button_6;
	private JPanel holyModify;
	private JButton button_7;
	private JButton button_8;
	private JButton button_9;
	private JButton button_10;
	private JButton button_11;
	private JPanel chulView;
	private JPanel reasonView;
	private JLabel lblNewLabel_5;
	private JLabel lblNewLabel_6;
	private JLabel lblNewLabel_7;
	private JLabel lblNewLabel_8;
	private JLabel lblNewLabel_9;
	private JScrollPane scrollPane;
	JTable ResultTable;
	private JButton btnNewButton_3;
	private JScrollPane scrollPane_1;
	JTextArea accident;
	private JScrollPane scrollPane_2;
	private JScrollPane scrollPane_3;
	JTextArea reason;
	JTextArea result;
	private JButton btnLogout_1;
	private JPanel resaoninput;
	private JButton btnNewButton_4;
	private JPanel serach;
	private JPanel holyput;
	private JComboBox comboyy;
	private JLabel lblNewLabel;
	private JComboBox comboMM;
	private JLabel lblNewLabel_1;
	private JComboBox combodd;
	private JLabel lblNewLabel_11;
	private JLabel lblNewLabel_13;
	private JButton btnSerach;
	private JButton btnSerachAll;
	private JComboBox SerachY;
	private JComboBox SerachM;
	private JComboBox SerachD;
	private JLabel label;
	private JPanel editorble;
	private JPanel editormain;
	private JButton button_12;
	private JLabel lblNewLabel_3;
	private JLabel lblNewLabel_4;
	private JLabel lblNewLabel_10;
	private JLabel userform;
	private JButton btnNewButton;



	public MemberHoly(Connection conn,ProductMain3 p) {   // 생성자 매개변수

		super("휴가 관리",true,true,true,false);
		addInternalFrameListener(new InternalFrameAdapter() {
			@Override
			public void internalFrameClosing(InternalFrameEvent e) {
				Logout();
			}
		});
		
		this.conn=conn;
		this.pm=p;

		
		Vector<String> colNames = new Vector<String>();
		colNames.add("Holyno");
		colNames.add("사원번호");
		colNames.add("이름");
		colNames.add("휴가신청일");
		colNames.add("휴가타입");
		colNames.add("휴가정보");
		model = new DefaultTableModel(colNames, 0);



		setBounds(100, 100, 581, 488);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
		contentPane.add(getLOGINnInput(), BorderLayout.NORTH);
		contentPane.add(getHOLY(), BorderLayout.EAST);
		contentPane.add(getECT(), BorderLayout.SOUTH);
		contentPane.add(getViewControl(), BorderLayout.WEST);
		contentPane.add(getVIEW(), BorderLayout.CENTER);
		

		connect_user();


	}
	public void Logout(){
		
		if(pm.mHoly != null){
			pm.closeholy();
		}
		if(pm.hr != null){
			pm.closereason();
		}
		if(pm.hr2 != null){
			pm.closereason2();
		}
		if(pm.mhe != null){
			pm.closeholyeditor();
		}
		if(pm.mhSelect != null){
			pm.closeholyeditorselect();
		}
		
		
	}
	public void setH(MemberHolyselect mhs){
		this.mhs=mhs;
	}
	public void setR(HolyReason hr){
		this.hr=hr;
	}
	public void setR2(HolyReason2 hr2){
		this.hr2=hr2;
	}

	public void defaultdate(){
		c = Calendar.getInstance();

		year = c.get ( c.YEAR );
		month = c.get ( c.MONTH ) + 1 ;
		nal = c.get(c.DATE);
		
		
		String Year = Integer.toString(year);
		String Month = "";
		if(month<10){
			Month = "0"+month;
		}else{
			Month = Integer.toString(month);
		}
		String Nal = Integer.toString(nal);
		
		comboyy.setSelectedItem(Year);
		SerachY.setSelectedItem(Year);

		comboMM.setSelectedItem(Month);
		SerachM.setSelectedItem(Month);
		
		combodd.setSelectedItem(Nal);
		SerachD.setSelectedItem(Nal);
		
	}
	public void connect_user(){

		try{
//			if(userID.getText().equals("") && password.getText().equals("")){
//				JOptionPane.showMessageDialog(null, "사원코드와 비밀번호를 확인해주세요.");
//				userID.setText("");
//				password.setText("");
//
//			}else{

				String sql = "select * from memberdata where memberid=? and working=1";
				pstmt = conn.prepareStatement(sql);

				pstmt.setString(1, pm.logincode);
				rs = pstmt.executeQuery();
				while(rs.next()){
					String key = rs.getString("pwd");
					String name = rs.getString("irum");
//					if(key.equals(password.getText())){

//						password.setText("");   // 접속햇을경우 비밀번호만 지움

						// 접속후 모든 휴가패널 활성화
//						LOGIN.setVisible(false); 
						holyput.setVisible(true);
						HOLY.setVisible(true);
						ECT.setVisible(true);
						VIEW.setVisible(true);
						ViewControl.setVisible(true);
						editorble.setVisible(false); // 로그인패널 비활성화
						
						userform.setText("    " + name + " 님 반갑습니다");
						
						

						if(pm.logincode.equals("AZ")){ //관리자로그인시 관리자 모드활성화
							editorble.setVisible(true);
							userform.setText("    " + name + " 님 반갑습니다");
						}
						
						defaultdate();
						
						return;
//					}
				}
//			}
		}catch(Exception e){
			JOptionPane.showMessageDialog(null, "잘못된 형식입니다");
			e.printStackTrace();
		}

	}
	public void openholytab(){
		holyput.setVisible(true);
		ECT.setVisible(true);
		
		defaultdate();
	}

	public void holyinput(String type){

		try{

			if(!yy.equals("") && !mm.equals("") && !dd.equals("")){
				int yn = -1; // 초기값

				if(type.equals("1")){
					yn = JOptionPane.showConfirmDialog(null, "월차를 신청하시겠습니까?");
				}else if(type.equals("2")){
					yn = JOptionPane.showConfirmDialog(null, "연차를 신청하시겠습니까?");
				}else if(type.equals("3")){
					yn = JOptionPane.showConfirmDialog(null, "생리휴가를 신청하시겠습니까?");
				}else if(type.equals("4")){
					yn = JOptionPane.showConfirmDialog(null, "사유서를 저장하시겠습니까?");
				}

				if(yn == JOptionPane.YES_OPTION){

					String nal = yy+"/"+mm+"/"+dd;

					String sql ="insert into holydata(holyno, memberid, holydate, holytype, info) "
							+ "values(holy_seq_no.nextval,?,?,?,?)";


					pstmt = conn.prepareStatement(sql);
					pstmt.setString(1, pm.logincode);
					pstmt.setString(2, nal);
					pstmt.setString(3, type);
					if(type.equals("1")){
						pstmt.setString(1, "월차");
					}else if(type.equals("2")){
						pstmt.setString(2, "연차");
					}else if(type.equals("3")){
						pstmt.setString(3, "생리");
					}else if(type.equals("4")){
						pstmt.setString(4, "심사중                                   %"+ accident.getText() + "%" + reason.getText() + "%" + result.getText());
					}

					pstmt.executeUpdate();//입력,수정,삭제;
					pstmt.close();

					JOptionPane.showMessageDialog(null, "신청 되었습니다");
					//초기화
					yy="";mm="";dd="";
					accident.setText("");
					reason.setText("");
					result.setText("");
					comboyy.setSelectedIndex(0);
					comboMM.setSelectedIndex(0);
					combodd.setSelectedIndex(0);
				}

			}else{
				JOptionPane.showMessageDialog(null, "신청할 날짜를 선택해주세요.");
			}
		}catch(Exception e){
			JOptionPane.showMessageDialog(null, "휴가 신청을 탭을 확인해주세요.");
		}

	}
	public void holymodify(String type){

		try{
			int row = -1;
			row = ResultTable.getSelectedRow();
			String hk = (String)model.getValueAt(ResultTable.getSelectedRow(), 1); // 사원코드
			String hkk = (String)model.getValueAt(row, 2); // 날짜
			String hkkk = (String)model.getValueAt(row, 3); // 휴가타입
			String hkkkk = (String)model.getValueAt(row, 4); // 휴가정보
			if(row != -1){

				String nal = hkk.substring(0, 10);

				if(!pm.logincode.equals(hk)){
					JOptionPane.showMessageDialog(null, "사원의 휴가를 수정하실수 없습니다.");
				}else{

					if(hkkk.equals("0") && hkkkk.equals("회사내규")){
						JOptionPane.showMessageDialog(null, "무급휴가 기간입니다.");
					}else{

						int yn = -1;
						if(type.equals("1")){
							yn = JOptionPane.showConfirmDialog(null, "월차로 수정하시겠습니까?");
						}else if(type.equals("2")){
							yn = JOptionPane.showConfirmDialog(null, "연차로 수정하시겠습니까?");
						}else if(type.equals("3")){
							yn = JOptionPane.showConfirmDialog(null, "생리휴가로 수정 하시겠습니까?");
						}

						if(yn == JOptionPane.YES_OPTION){


							String sql = "update holydata set holytype=?, info=? where memberid=? and holydate=?";


							pstmt = conn.prepareStatement(sql);

							if(type.equals("1")){
								pstmt.setString(1, "1");
								pstmt.setString(2, "월차");
							}else if(type.equals("2")){
								pstmt.setString(1, "2");
								pstmt.setString(2, "연차");
							}else if(type.equals("3")){
								pstmt.setString(1, "3");
								pstmt.setString(2, "생리");
							}
							pstmt.setString(3, hk);
							pstmt.setString(4, nal);

							pstmt.executeUpdate();//입력,수정,삭제;

							pstmt.close();

							JOptionPane.showMessageDialog(null, "수정 되었습니다");

							String info="";
							if(type.equals("1")){
								info = "월차";
							}else if(type.equals("2")){
								info = "연차";
							}else if(type.equals("3")){
								info = "생리";
							}

							model.setValueAt((String)type,row, 3);
							model.setValueAt(info, row, 4);


							JOptionPane.showMessageDialog(null, "수정되었습니다. ");
						}else{
							JOptionPane.showMessageDialog(null, "취소되었습니다. ");
						}
					}
				}
			}

			else{
				JOptionPane.showMessageDialog(null, "수정하고자 하는 날짜를 선택하세요..");
			}
		}catch(Exception e){
			JOptionPane.showMessageDialog(null, "입력형식이 잘못되었습니다. ");
		}

	}
	public void holydelete(){

		try{
			int row = -1;
			row = ResultTable.getSelectedRow();
			String hk = (String)model.getValueAt(ResultTable.getSelectedRow(), 1); // 사원코드
			String hkk = (String)model.getValueAt(row, 2); // 날짜
			String hkkk = (String)model.getValueAt(row, 3); // 휴가타입
			String hkkkk = (String)model.getValueAt(row, 4); // 휴가정보
			if(row != -1){

				String nal = hkk.substring(0, 10);

				if(!pm.logincode.equals(hk)){
					JOptionPane.showMessageDialog(null, "사원의 휴가를 삭제하실수 없습니다.");
				}else{

					if(hkkk.equals("0") && hkkkk.equals("회사내규")){
						JOptionPane.showMessageDialog(null, "무급휴가 기간입니다.");
					}else{


						int yn = JOptionPane.showConfirmDialog(null, "삭제 하시겠습니까?");

						if(yn == JOptionPane.YES_OPTION){

							String sql = "delete from holydata where memberid=? and holydate=?";


							pstmt = conn.prepareStatement(sql);
							pstmt.setString(1, pm.logincode);
							pstmt.setString(2, nal);

							pstmt.executeUpdate();//입력,수정,삭제;
							pstmt.close();


							JOptionPane.showMessageDialog(null, "삭제 되었습니다. ");
						}
						else{
							JOptionPane.showMessageDialog(null, "취소되었습니다. ");
						}
					}

				}
			}

		}catch(Exception e){
			JOptionPane.showMessageDialog(null, "잘못된 형식입니다");
			e.printStackTrace();
		}

	}
	public void removeall(){
		for(int i=model.getRowCount()-1;i>=0;i--){
			model.removeRow(i);
		}
		model = null;
		tSoter = null;
		rs = null;
		rsmd = null;
		pstmt = null;
		v = null;
	}

	public void holyserach(){
		if(ResultTable!=null){
			for(int i=model.getRowCount()-1;i>=0;i--){
				model.removeRow(i);
			}
		}


		String id = pm.logincode;

		try{

			if(id.equals("AZ")){
//				pm.openholyselect();

				String sql = "select h.holyno, h.memberid, m.irum, to_char(h.holydate,'yyyy-mm-dd'), h.holytype, h.info from holydata h inner join memberdata m on h.memberid=m.memberid order by holyno";
				pstmt = conn.prepareStatement(sql);
			}else{
				String sql = "select h.holyno, h.memberid, m.irum, to_char(h.holydate,'yyyy-mm-dd'), h.holytype, h.info from holydata h inner join memberdata m on h.memberid=m.memberid where h.memberid=? order by holyno";
				pstmt = conn.prepareStatement(sql);
				pstmt.setString(1, id);
			}


			rs = pstmt.executeQuery();// 리절트셋에 대한 부가정보를 갖는 객체얻어오기
			rsmd = rs.getMetaData();

			int colCount = rsmd.getColumnCount();

			while (rs.next()) {
				
				v= new Vector<String>();
				v.add(rs.getString(1));
				v.add(rs.getString(2));
				v.add(rs.getString(3));
				v.add(rs.getString(4));
				v.add(rs.getString(5));
				v.add(rs.getString(6));
				model.addRow(v);
			}
			
			tcmSchedule = ResultTable.getColumnModel();
			Center.setHorizontalAlignment(SwingConstants.CENTER);
			tcmSchedule.getColumn(0).setCellRenderer(Center);
			tcmSchedule.getColumn(1).setCellRenderer(Center);
			tcmSchedule.getColumn(2).setCellRenderer(Center);
			tcmSchedule.getColumn(4).setCellRenderer(Center);
			tcmSchedule.getColumn(5).setCellRenderer(Center);
//			rs.close();
//			pstmt.close();
			//			ResultTable.setModel(model);


		}catch(Exception e){
			JOptionPane.showMessageDialog(null, "잘못된 형식입니다");
			e.printStackTrace();
		}
	}


	private JButton getBtnNewButton_1() {
		if (btnNewButton_1 == null) {
			btnNewButton_1 = new JButton("휴가신청"); // 신청 탭활성화
			btnNewButton_1.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent arg0) {

					holyMain.setVisible(false);
					holyput.setVisible(true);
					holyInput.setVisible(true);

				}
			});
			btnNewButton_1.setBounds(12, 10, 90, 23);
		}
		return btnNewButton_1;
	}


	private JPanel getLOGINnInput() {
		if (LOGINnInput == null) {
			LOGINnInput = new JPanel();
			LOGINnInput.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
			LOGINnInput.setLayout(new CardLayout(0, 0));
			LOGINnInput.add(getHolyput(), "name_39638304307443");
		}
		return LOGINnInput;
	}
	private JPanel getHOLY() {
		if (HOLY == null) {
			HOLY = new JPanel();
			HOLY.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
			HOLY.setPreferredSize(new Dimension(110, 10));
			HOLY.setLayout(new CardLayout(0, 0));
			HOLY.add(getHolyMain(), "name_8330428065663");
			HOLY.add(getHolyInput(), "name_8336521361165");
			HOLY.add(getPanel_5(), "name_20770618232552");
			HOLY.setVisible(false);
		}
		return HOLY;
	}
	private JPanel getECT() {
		if (ECT == null) {
			ECT = new JPanel();
			ECT.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
			ECT.setPreferredSize(new Dimension(10, 50));
			ECT.setLayout(new CardLayout(0, 0));
			ECT.add(getSerach(), "name_28789105748533");
			ECT.add(getResaoninput(), "name_27866658764509");
			ECT.setVisible(false);
		}
		return ECT;
	}
	private JPanel getHolyMain() {
		if (holyMain == null) {
			holyMain = new JPanel();
			holyMain.setLayout(null);
			holyMain.add(getBtnNewButton_1());
			holyMain.add(getButton_5());
			holyMain.add(getButton_6());
		}
		return holyMain;
	}
	private JPanel getHolyInput() {
		if (holyInput == null) {
			holyInput = new JPanel();
			GridBagLayout gbl_holyInput = new GridBagLayout();
			gbl_holyInput.columnWidths = new int[]{0, 0};
			gbl_holyInput.rowHeights = new int[]{0, 0, 0};
			gbl_holyInput.columnWeights = new double[]{1.0, Double.MIN_VALUE};
			gbl_holyInput.rowWeights = new double[]{1.0, 1.0, Double.MIN_VALUE};
			holyInput.setLayout(gbl_holyInput);
			getHolypay().setLayout(null);
			GridBagConstraints gbc_holypay = new GridBagConstraints();
			gbc_holypay.insets = new Insets(0, 0, 5, 0);
			gbc_holypay.fill = GridBagConstraints.BOTH;
			gbc_holypay.gridx = 0;
			gbc_holypay.gridy = 0;
			holyInput.add(getHolypay(), gbc_holypay);
			GridBagConstraints gbc_holynotpay = new GridBagConstraints();
			gbc_holynotpay.fill = GridBagConstraints.BOTH;
			gbc_holynotpay.gridx = 0;
			gbc_holynotpay.gridy = 1;
			holyInput.add(getHolynotpay(), gbc_holynotpay);
		}
		return holyInput;
	}

	private JPanel getHolypay() {
		if (holypay == null) {
			holypay = new JPanel();
			holypay.add(getLblNewLabel_2());
			holypay.add(getBtnNewButton_2());
			holypay.add(getButton());
			holypay.add(getButton_1());
			holypay.add(getButton_4());
		}
		return holypay;
	}
	private JPanel getHolynotpay() {
		if (holynotpay == null) {
			holynotpay = new JPanel();
			holynotpay.setLayout(new CardLayout(0, 0));
			holynotpay.add(getEditorbtn(), "name_9244459442187");
		}
		return holynotpay;
	}
	private JLabel getLblNewLabel_2() {
		if (lblNewLabel_2 == null) {
			lblNewLabel_2 = new JLabel("유급 휴가 신청");
			lblNewLabel_2.setHorizontalAlignment(SwingConstants.CENTER);
			lblNewLabel_2.setBounds(0, 0, 100, 15);
		}
		return lblNewLabel_2;
	}
	private JButton getBtnNewButton_2() {
		if (btnNewButton_2 == null) {
			btnNewButton_2 = new JButton("월차신청");
			btnNewButton_2.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent arg0) {


					holyinput("1");

				}
			});
			btnNewButton_2.setBounds(10, 25, 90, 23);
		}
		return btnNewButton_2;
	}
	private JButton getButton() {
		if (button == null) {
			button = new JButton("연차신청");
			button.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent arg0) {

					holyinput("2");

				}
			});
			button.setBounds(10, 58, 90, 23);
		}
		return button;
	}
	private JButton getButton_1() {
		if (button_1 == null) {
			button_1 = new JButton("생리휴가");
			button_1.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent arg0) {

					holyinput("3");

				}
			});
			button_1.setBounds(10, 91, 90, 23);
		}
		return button_1;
	}
	private JPanel getEditorbtn() {
		if (editorbtn == null) {
			editorbtn = new JPanel();
			editorbtn.setLayout(null);
			editorbtn.add(getButton_2());
		}
		return editorbtn;
	}
	private JButton getButton_2() {
		if (button_2 == null) {
			button_2 = new JButton("이전단계"); // 이전단계 패널로 이동
			button_2.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent arg0) {

					holyMain.setVisible(true);
					holyInput.setVisible(false);

				}
			});
			button_2.setBounds(12, 147, 90, 23);
		}
		return button_2;
	}
	private JButton getButton_4() {
		if (button_4 == null) {
			button_4 = new JButton("기타"); // 사유서신청시 사유서창과 사유서저장버튼 패널활성화
			button_4.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent arg0) {

					chulView.setVisible(false);
					reasonView.setVisible(true);
					resaoninput.setVisible(true);
					serach.setVisible(false);


				}
			});
			button_4.setBounds(10, 124, 90, 23);
		}
		return button_4;
	}
	private JPanel getViewControl() {
		if (ViewControl == null) {
			ViewControl = new JPanel();
			ViewControl.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
			ViewControl.setPreferredSize(new Dimension(100, 10));
			ViewControl.setLayout(null);
			ViewControl.add(getBtnNewButton_3());
			ViewControl.add(getBtnLogout_1());
			ViewControl.add(getEditorble());
			ViewControl.setVisible(false);
		}
		return ViewControl;
	}
	private JPanel getVIEW() {
		if (VIEW == null) {
			VIEW = new JPanel();
			VIEW.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
			VIEW.setLayout(new CardLayout(0, 0));
			VIEW.add(getChulView(), "name_21151974881175");
			VIEW.add(getReasonView(), "name_21841486159679");
			VIEW.setVisible(false);
		}
		return VIEW;
	}
	private JButton getButton_5() {
		if (button_5 == null) {
			button_5 = new JButton("수정");
			button_5.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent arg0) {
					holyModify.setVisible(true);
					holyMain.setVisible(false);
				}
			});
			button_5.setBounds(12, 43, 90, 23);
		}
		return button_5;
	}
	private JButton getButton_6() {
		if (button_6 == null) {
			button_6 = new JButton("삭제");
			button_6.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {

					holydelete();

				}
			});
			button_6.setBounds(12, 76, 90, 23);
		}
		return button_6;
	}
	private JPanel getPanel_5() {
		if (holyModify == null) {
			holyModify = new JPanel();
			holyModify.setLayout(null);
			holyModify.add(getButton_7());
			holyModify.add(getButton_8());
			holyModify.add(getButton_9());
			holyModify.add(getButton_11());
			holyModify.add(getLabel());
		}
		return holyModify;
	}
	private JButton getButton_7() {
		if (button_7 == null) {
			button_7 = new JButton("월차");
			button_7.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent arg0) {

					holymodify("1");

				}
			});
			button_7.setBounds(12, 24, 90, 23);
		}
		return button_7;
	}
	private JButton getButton_8() {
		if (button_8 == null) {
			button_8 = new JButton("연차");
			button_8.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent arg0) {

					holymodify("2");

				}
			});
			button_8.setBounds(12, 57, 90, 23);
		}
		return button_8;
	}
	private JButton getButton_9() {
		if (button_9 == null) {
			button_9 = new JButton("생리");
			button_9.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent arg0) {

					holymodify("3");

				}
			});
			button_9.setBounds(12, 90, 90, 23);
		}
		return button_9;
	}
	private JButton getButton_11() {
		if (button_11 == null) {
			button_11 = new JButton("이전단계"); // 휴가메인 패널로 이동
			button_11.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent arg0) {


					holyModify.setVisible(false);
					holyMain.setVisible(true);


				}
			});
			button_11.setBounds(12, 324, 90, 23);
		}
		return button_11;
	}
	private JPanel getChulView() {
		if (chulView == null) {
			chulView = new JPanel();
			chulView.setLayout(new BorderLayout(0, 0));
			chulView.add(getScrollPane(), BorderLayout.CENTER);
		}
		return chulView;
	}
	private JPanel getReasonView() {
		if (reasonView == null) {
			reasonView = new JPanel();
			GridBagLayout gbl_reasonView = new GridBagLayout();
			gbl_reasonView.columnWidths = new int[]{0, 0, 0};
			gbl_reasonView.rowHeights = new int[]{0, 0, 0, 0, 0};
			gbl_reasonView.columnWeights = new double[]{0.0, 1.0, Double.MIN_VALUE};
			gbl_reasonView.rowWeights = new double[]{0.0, 1.0, 1.0, 1.0, Double.MIN_VALUE};
			reasonView.setLayout(gbl_reasonView);
			GridBagConstraints gbc_lblNewLabel_5 = new GridBagConstraints();
			gbc_lblNewLabel_5.insets = new Insets(0, 0, 5, 5);
			gbc_lblNewLabel_5.gridx = 0;
			gbc_lblNewLabel_5.gridy = 0;
			reasonView.add(getLblNewLabel_5(), gbc_lblNewLabel_5);
			GridBagConstraints gbc_lblNewLabel_6 = new GridBagConstraints();
			gbc_lblNewLabel_6.insets = new Insets(0, 0, 5, 0);
			gbc_lblNewLabel_6.gridx = 1;
			gbc_lblNewLabel_6.gridy = 0;
			reasonView.add(getLblNewLabel_6(), gbc_lblNewLabel_6);
			GridBagConstraints gbc_lblNewLabel_7 = new GridBagConstraints();
			gbc_lblNewLabel_7.anchor = GridBagConstraints.EAST;
			gbc_lblNewLabel_7.insets = new Insets(0, 0, 5, 5);
			gbc_lblNewLabel_7.gridx = 0;
			gbc_lblNewLabel_7.gridy = 1;
			reasonView.add(getLblNewLabel_7(), gbc_lblNewLabel_7);
			GridBagConstraints gbc_scrollPane_1 = new GridBagConstraints();
			gbc_scrollPane_1.insets = new Insets(0, 0, 5, 0);
			gbc_scrollPane_1.fill = GridBagConstraints.BOTH;
			gbc_scrollPane_1.gridx = 1;
			gbc_scrollPane_1.gridy = 1;
			reasonView.add(getScrollPane_1(), gbc_scrollPane_1);
			GridBagConstraints gbc_lblNewLabel_8 = new GridBagConstraints();
			gbc_lblNewLabel_8.anchor = GridBagConstraints.EAST;
			gbc_lblNewLabel_8.insets = new Insets(0, 0, 5, 5);
			gbc_lblNewLabel_8.gridx = 0;
			gbc_lblNewLabel_8.gridy = 2;
			reasonView.add(getLblNewLabel_8(), gbc_lblNewLabel_8);
			GridBagConstraints gbc_scrollPane_2 = new GridBagConstraints();
			gbc_scrollPane_2.insets = new Insets(0, 0, 5, 0);
			gbc_scrollPane_2.fill = GridBagConstraints.BOTH;
			gbc_scrollPane_2.gridx = 1;
			gbc_scrollPane_2.gridy = 2;
			reasonView.add(getScrollPane_2(), gbc_scrollPane_2);
			GridBagConstraints gbc_lblNewLabel_9 = new GridBagConstraints();
			gbc_lblNewLabel_9.anchor = GridBagConstraints.EAST;
			gbc_lblNewLabel_9.insets = new Insets(0, 0, 0, 5);
			gbc_lblNewLabel_9.gridx = 0;
			gbc_lblNewLabel_9.gridy = 3;
			reasonView.add(getLblNewLabel_9(), gbc_lblNewLabel_9);
			GridBagConstraints gbc_scrollPane_3 = new GridBagConstraints();
			gbc_scrollPane_3.fill = GridBagConstraints.BOTH;
			gbc_scrollPane_3.gridx = 1;
			gbc_scrollPane_3.gridy = 3;
			reasonView.add(getScrollPane_3(), gbc_scrollPane_3);
		}
		return reasonView;
	}
	private JLabel getLblNewLabel_5() {
		if (lblNewLabel_5 == null) {
			lblNewLabel_5 = new JLabel("");
		}
		return lblNewLabel_5;
	}
	private JLabel getLblNewLabel_6() {
		if (lblNewLabel_6 == null) {
			lblNewLabel_6 = new JLabel("내용");
		}
		return lblNewLabel_6;
	}
	private JLabel getLblNewLabel_7() {
		if (lblNewLabel_7 == null) {
			lblNewLabel_7 = new JLabel("사고");
			lblNewLabel_7.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
			lblNewLabel_7.setHorizontalAlignment(SwingConstants.CENTER);
			lblNewLabel_7.setPreferredSize(new Dimension(80, 105));
		}
		return lblNewLabel_7;
	}
	private JLabel getLblNewLabel_8() {
		if (lblNewLabel_8 == null) {
			lblNewLabel_8 = new JLabel("사유");
			lblNewLabel_8.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
			lblNewLabel_8.setHorizontalAlignment(SwingConstants.CENTER);
			lblNewLabel_8.setPreferredSize(new Dimension(80, 105));
		}
		return lblNewLabel_8;
	}
	private JLabel getLblNewLabel_9() {
		if (lblNewLabel_9 == null) {
			lblNewLabel_9 = new JLabel("처리");
			lblNewLabel_9.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
			lblNewLabel_9.setHorizontalAlignment(SwingConstants.CENTER);
			lblNewLabel_9.setPreferredSize(new Dimension(80, 105));
		}
		return lblNewLabel_9;
	}
	private JScrollPane getScrollPane() {
		if (scrollPane == null) {
			scrollPane = new JScrollPane();
			scrollPane.setViewportView(getResultTable());
		}
		return scrollPane;
	}
	public void reasonmodify(String code, String nal){

		System.out.println("modify넘어옴");

		try{
			String sql = "Select * from holydata where memberid=? and holydate=?";
			pstmt = conn.prepareStatement(sql);
			if(conn!=null){
				System.out.println("conn받아옴");
			}
			System.out.println(code);
			System.out.println(nal);
			pstmt.setString(1, code);
			pstmt.setString(2, nal);

			rs = pstmt.executeQuery();

			while(rs.next()){
				v = new Vector<String>();
				v.add(rs.getString(1));
				//						System.out.println(v);
				Reason = rs.getString("info");
				System.out.println(Reason);

			}
			pm.openreason2();
			hr2.setData(code,nal,Reason);


		}catch(Exception e){
			e.printStackTrace();
		}

	}
	public void reasoneditor(String code, String nal){
		String Rs = "";
		System.out.println("modify넘어옴");

		try{
			String sql = "Select * from holydata where memberid=? and holydate=?";
			pstmt = conn.prepareStatement(sql);
			if(conn!=null){
				System.out.println("conn받아옴");
			}
			pstmt.setString(1, code);
			pstmt.setString(2, nal);

			rs = pstmt.executeQuery();

			while(rs.next()){
				v = new Vector<String>();
				//			v.add(rs.getString("info"));

				Rs = rs.getString("info");
				System.out.println(Rs);


			}
			pm.openreason();
			hr.setData(code, nal, Rs);




		}catch(Exception e){
			JOptionPane.showMessageDialog(null, "알 수 없는 오류가 발생했습니다.");
			e.printStackTrace();
		}



	}
	private JTable getResultTable() {
		if (ResultTable == null) {
			ResultTable = new JTable(model);
			ResultTable.addMouseListener(new MouseAdapter() {
				@Override
				public void mousePressed(MouseEvent arg0) {


					int row = -1;
					row = ResultTable.getSelectedRow();
					String k = (String) ResultTable.getValueAt(row, 1); // 사원번호
					String kk = (String) ResultTable.getValueAt(row, 3); // 날짜
					String kkk = (String) ResultTable.getValueAt(row, 4); // 타입
					String kkkk = (String) ResultTable.getValueAt(row, 5); // info
					String nal = kk.substring(0,10);
					if(kkk.equals("4") && pm.logincode.equals("AZ") && !kkkk.equals("회사내규")){

						reasoneditor(k,kk);
					}else if(kkk.equals("4") && !pm.logincode.equals("AZ") && !kkkk.equals("회사내규")){

						reasonmodify(k,kk);
					}else if(hr !=null){
						hr.setVisible(false);
					}else if(hr2 !=null){
						hr2.setVisible(false);
					}

				}
			});
			tSoter = new TableRowSorter(model);
			ResultTable.setRowSorter(tSoter);
		}
		return ResultTable;
	}
	private JButton getBtnNewButton_3() {
		if (btnNewButton_3 == null) {
			btnNewButton_3 = new JButton("현황"); // 조회테이블 패널과 조회버튼패널로 이동
			btnNewButton_3.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent arg0) {

					chulView.setVisible(true);
					reasonView.setVisible(false);
					resaoninput.setVisible(false);
					serach.setVisible(true);

				}
			});
			btnNewButton_3.setBounds(12, 10, 76, 23);
		}
		return btnNewButton_3;
	}
	private JScrollPane getScrollPane_1() {
		if (scrollPane_1 == null) {
			scrollPane_1 = new JScrollPane();
			scrollPane_1.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
			scrollPane_1.setPreferredSize(new Dimension(80, 100));
			scrollPane_1.setViewportView(getAccident());
		}
		return scrollPane_1;
	}
	private JTextArea getAccident() {
		if (accident == null) {
			accident = new JTextArea();
		}
		return accident;
	}
	private JScrollPane getScrollPane_2() {
		if (scrollPane_2 == null) {
			scrollPane_2 = new JScrollPane();
			scrollPane_2.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
			scrollPane_2.setViewportView(getReason());
		}
		return scrollPane_2;
	}
	private JScrollPane getScrollPane_3() {
		if (scrollPane_3 == null) {
			scrollPane_3 = new JScrollPane();
			scrollPane_3.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
			scrollPane_3.setViewportView(getResult());
		}
		return scrollPane_3;
	}
	private JTextArea getReason() {
		if (reason == null) {
			reason = new JTextArea();
		}
		return reason;
	}
	private JTextArea getResult() {
		if (result == null) {
			result = new JTextArea();
		}
		return result;
	}
	private JButton getBtnLogout_1() {
		if (btnLogout_1 == null) {
			btnLogout_1 = new JButton("Logout"); // 로그아웃버튼클릭시 모든 패널을 닫고 JTable을 초기화
			btnLogout_1.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent arg0) {

					HOLY.setVisible(false);
					ECT.setVisible(false);
					ViewControl.setVisible(false);
					VIEW.setVisible(false);
//					LOGIN.setVisible(true);
					holyput.setVisible(false);

					if(model!=null){
						for(int i=model.getRowCount()-1;i>=0;i--){
							model.removeRow(i);
						}
					}


				}
			});
			btnLogout_1.setBounds(12, 158, 76, 23);
		}
		return btnLogout_1;
	}
	private JPanel getResaoninput() {
		if (resaoninput == null) {
			resaoninput = new JPanel();
			resaoninput.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
			resaoninput.add(getBtnNewButton_4());
		}
		return resaoninput;
	}
	private JButton getBtnNewButton_4() {
		if (btnNewButton_4 == null) {
			btnNewButton_4 = new JButton("사유서 저장"); 
			btnNewButton_4.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent arg0) {

					holyinput("4");

				}
			});
		}
		return btnNewButton_4;
	}
	private JPanel getSerach() {
		if (serach == null) {
			serach = new JPanel();
			serach.add(getSerachY());
			serach.add(getLblNewLabel_3());
			serach.add(getSerachM());
			serach.add(getLblNewLabel_4());
			serach.add(getSerachD());
			serach.add(getLblNewLabel_10());
			serach.add(getBtnSerach());
			serach.add(getBtnSerachAll());
		}
		return serach;
	}
	private JPanel getHolyput() {
		if (holyput == null) {
			holyput = new JPanel();
			holyput.add(getLblNewLabel_13());
			holyput.add(getComboyy());
			holyput.add(getLblNewLabel());
			holyput.add(getComboMM());
			holyput.add(getLblNewLabel_1());
			holyput.add(getCombodd());
			holyput.add(getLblNewLabel_11());
			holyput.add(getUserform());
		}
		return holyput;
	}
	private JComboBox getComboyy() {
		if (comboyy == null) {
			comboyy = new JComboBox(y);
			comboyy.addItemListener(new ItemListener() {
				public void itemStateChanged(ItemEvent e) {
					if(e.getStateChange() == e.SELECTED){ // 콤보박스 값이 선택되었을경우
						yy = (String)(e.getItem());
					}
				}
			});
		}
		return comboyy;
	}
	private JLabel getLblNewLabel() {
		if (lblNewLabel == null) {
			lblNewLabel = new JLabel("년");
		}
		return lblNewLabel;
	}
	private JComboBox getComboMM() {
		if (comboMM == null) {
			comboMM = new JComboBox(m);
			comboMM.addItemListener(new ItemListener() {
				public void itemStateChanged(ItemEvent e) {
					if(e.getStateChange() == e.SELECTED){
						cmodel.removeAllElements();
						mm = (String)(e.getItem());
						// 4,6,9,11월은 30일까지 나옴
						if(mm.equals("04") || mm.equals("06") || mm.equals("09") || mm.equals("11")){
							cmodel.addElement("");
							for(int i=1;i<=30;i++){
								if(i<10){
									ccmodel.addElement("0"+Integer.toString(i));
								}else{
									ccmodel.addElement(Integer.toString(i));
								}
							}
							// 2월은 28일까지 나옴
						}else if(mm.equals("02")){
							cmodel.addElement("");
							for(int i=1;i<=28;i++){
								if(i<10){
									ccmodel.addElement("0"+Integer.toString(i));
								}else{
									ccmodel.addElement(Integer.toString(i));
								}
							}
							// 1,3,5,7,8,10,12월은 30일까지 나옴
						}else{
							cmodel.addElement("");
							for(int i=1;i<=31;i++){
								if(i<10){
									ccmodel.addElement("0"+Integer.toString(i));
								}else{
									ccmodel.addElement(Integer.toString(i));
								}
							}
						}
						//						System.out.println(cmodel.getSize());
						combodd.setModel(ccmodel); // 월별에 따른 일수 갱신

					}
				}
			});
		}
		return comboMM;
	}
	private JLabel getLblNewLabel_1() {
		if (lblNewLabel_1 == null) {
			lblNewLabel_1 = new JLabel("월");
		}
		return lblNewLabel_1;
	}
	private JComboBox getCombodd() {
		if (combodd == null) {
			combodd = new JComboBox(ccmodel);
			combodd.addItemListener(new ItemListener() {
				public void itemStateChanged(ItemEvent e) {
					if(e.getStateChange() == e.SELECTED){
						dd = (String) (e.getItem());
					}
				}
			});
						combodd.setModel(new DefaultComboBoxModel(d));

		}
		return combodd;
	}
	private JLabel getLblNewLabel_11() {
		if (lblNewLabel_11 == null) {
			lblNewLabel_11 = new JLabel("일");
		}
		return lblNewLabel_11;
	}
	private JLabel getLblNewLabel_13() {
		if (lblNewLabel_13 == null) {
			lblNewLabel_13 = new JLabel("휴가 신청일");
		}
		return lblNewLabel_13;
	}
	private JButton getBtnSerach() {
		if (btnSerach == null) {
			btnSerach = new JButton("조회");
			btnSerach.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent arg0) {



					try{
						//테이블 초기화
						for(int i=model.getRowCount()-1;i>=0;i--){
							model.removeRow(i);
						}


						if(YY.equals("") && MM.equals("") && DD.equals("")){ // 년별 월별 일별로 조회가능
							JOptionPane.showMessageDialog(null, "조회할 값을 선택해 주세요 ");
						}else{

							String nal = YY + "/" + MM + "/" + DD;


							if( !pm.logincode.equals("AZ") ) { // 사원

								String sql = "select * from holydata where memberid=? and holydate=?";
								pstmt = conn.prepareStatement(sql);
								pstmt.setString(1, pm.logincode);
								pstmt.setString(2, nal);
								rs = pstmt.executeQuery();

								while(rs.next()){

									v = new Vector<String>();
									v.add(rs.getString("holyno"));
									v.add(rs.getString("memberid"));
									v.add(rs.getString("holydate"));
									v.add(rs.getString("holytype"));
									v.add(rs.getString("info"));
									model.addRow(v);

								}

								ResultTable = new JTable(model);

								YY="";MM="";DD="";
								SerachY.setSelectedIndex(0);
								SerachM.setSelectedIndex(0);
								SerachD.setSelectedIndex(0);

							}else if(pm.logincode.equals("AZ")){ //관리자

								String sql = "select * from holydata where holydate=?";
								pstmt = conn.prepareStatement(sql);
								pstmt.setString(1, nal);
								rs = pstmt.executeQuery();

								while(rs.next()){

									v = new Vector<String>();
									v.add(rs.getString("holyno"));
									v.add(rs.getString("memberid"));
									v.add(rs.getString("holydate"));
									v.add(rs.getString("holytype"));
									v.add(rs.getString("info"));
									model.addRow(v);
								}


								ResultTable = new JTable(model);
								YY="";MM="";DD="";

								SerachY.setSelectedIndex(0);
								SerachM.setSelectedIndex(0);
								SerachD.setSelectedIndex(0);

							}
						}

					}catch(Exception e){
						JOptionPane.showMessageDialog(null, "조회일을 오늘날짜로 변경합니다.");
						defaultdate();
					}



				}
			});
		}
		return btnSerach;
	}
	private JButton getBtnSerachAll() {
		if (btnSerachAll == null) {
			btnSerachAll = new JButton("모두 조회");
			btnSerachAll.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent arg0) {


					holyserach();
					

				}
			});
		}
		return btnSerachAll;
	}
	private JComboBox getSerachY() {
		if (SerachY == null) {
			SerachY = new JComboBox(y);
			SerachY.addItemListener(new ItemListener() {
				public void itemStateChanged(ItemEvent e) {

					if(e.getStateChange() == e.SELECTED){ // 콤보박스 값이 선택되었을경우
						YY = (String)(e.getItem()); 
					}

				}
			});
		}
		return SerachY;
	}
	private JComboBox getSerachM() {
		if (SerachM == null) {
			SerachM = new JComboBox(m);
			SerachM.addItemListener(new ItemListener() {
				public void itemStateChanged(ItemEvent e) {

					if(e.getStateChange() == e.SELECTED){ // 콤보박스 값이 선택되었을경우

						cmodel.removeAllElements();
						MM = (String)(e.getItem());

						if(MM.equals("04") || MM.equals("06") || MM.equals("09") || MM.equals("11")){
							cmodel.addElement("");
							for(int i=1;i<=30;i++){
								if(i<10){
									cmodel.addElement("0"+Integer.toString(i));
								}else{
									cmodel.addElement(Integer.toString(i));
								}
							}

						}else if(MM.equals("02")){
							cmodel.addElement("");
							for(int i=1;i<=28;i++){
								if(i<10){
									cmodel.addElement("0"+Integer.toString(i));
								}else{
									cmodel.addElement(Integer.toString(i));
								}
							}

						}else{
							cmodel.addElement("");
							for(int i=1;i<=31;i++){
								if(i<10){
									cmodel.addElement("0"+Integer.toString(i));
								}else{
									cmodel.addElement(Integer.toString(i));
								}
							}
						}
						SerachD.setModel(cmodel);

					}

				}
			});
		}
		return SerachM;
	}
	private JComboBox getSerachD() {
		if (SerachD == null) {
			SerachD = new JComboBox(cmodel);
			SerachD.addItemListener(new ItemListener() {
				public void itemStateChanged(ItemEvent e) {



					if(e.getStateChange() == e.SELECTED){ // 콤보박스 값이 선택되었을경우
						DD = (String)(e.getItem());
					}


				}
			});
			SerachD.setModel(new DefaultComboBoxModel(d));
		}
		return SerachD;
	}
	private JLabel getLabel() {
		if (label == null) {
			label = new JLabel("유급 휴가 수정");
			label.setHorizontalAlignment(SwingConstants.CENTER);
			label.setBounds(2, 0, 100, 15);
		}
		return label;
	}
	private JPanel getEditorble() {
		if (editorble == null) {
			editorble = new JPanel();
			editorble.setBounds(5, 191, 95, 170);
			editorble.setLayout(new CardLayout(0, 0));
			editorble.add(getEditormain(), "name_2378880706816");
		}
		return editorble;
	}
	private JPanel getEditormain() {
		if (editormain == null) {
			editormain = new JPanel();
			editormain.setLayout(null);
			editormain.add(getButton_12_1());
			editormain.add(getBtnNewButton());
		}
		return editormain;
	}
	private JButton getButton_12_1() {
		if (button_12 == null) {
			button_12 = new JButton("관리자");
			button_12.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {

					pm.openholyeditor();
					//					editormain.setVisible(false);
					//					holyeditor.setVisible(true);
				}
			});
			button_12.setBounds(7, 10, 76, 23);
		}
		return button_12;
	}
	private JLabel getLblNewLabel_3() {
		if (lblNewLabel_3 == null) {
			lblNewLabel_3 = new JLabel("년");
		}
		return lblNewLabel_3;
	}
	private JLabel getLblNewLabel_4() {
		if (lblNewLabel_4 == null) {
			lblNewLabel_4 = new JLabel("월");
		}
		return lblNewLabel_4;
	}
	private JLabel getLblNewLabel_10() {
		if (lblNewLabel_10 == null) {
			lblNewLabel_10 = new JLabel("일");
		}
		return lblNewLabel_10;
	}
	private JLabel getUserform() {
		if (userform == null) {
			userform = new JLabel("ㅋ");
		}
		return userform;
	}
	private JButton getBtnNewButton() {
		if (btnNewButton == null) {
			btnNewButton = new JButton("상세조회");
			btnNewButton.setBounds(7, 43, 81, 23);
			btnNewButton.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					
					pm.openholyselect();
					
				}
			});
		}
		return btnNewButton;
	}
}
